Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added a cmake install target that installs the libraries, headers and the CLI binaries to CMAKE_INSTALL_PREFIX.
This is how I built and installed luau with this PR (on a linux machine):
Differences from #926 and #1317:
I added a step in the CMakeLists.txt to install a pkgconfig file so that this can be used in other build systems (e.g. Meson). I can also add the cmake-only LuauConfig file back in, however this is still useable from other cmake projects using pkgconfig.
Additionally, I got a warning that cmake versions <3.10 were deprecated, so I bumped the minimum required cmake version to 3.10. If needed I can change this to
3.0..3.10
so that 3.0 still works.The version is also detected from the latest git tag. Not sure if this is right way to automate it but it should allow installing the pkgconfig file with the correct version after a tag is created.
I also had to add JoinPaths.cmake, which could be removed if the minimum cmake version is bumped to 3.20. See https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files